import request from "@/utils/request";




export const test = (name: any) => request.get(`/user/find/?name=${name}`)
//注册
export const register = (data: any) => request.post(`/user/register`, data)
// http://127.0.0.1:3000/api/user/register
//登录
export const login = (data: any) => request.post('/user', data)
//修改资料
export const upinfo = (data: any, id: String) => request.patch(`/user/info/?id=${id}`, data)
//获取个人信息
export const getuseinfo = (id: any) => request.get(`/user/find?id=${id}`)
//修改头像
export const upavatar = (data: any) => request.patch(`/user/avatar`, data)
//忘记密码
export const forgetpass = (data: any) => request.patch(`/user/forget`, data)